﻿using System;
using System.Configuration;

namespace PhantomDb.Config.Configuration
{
    public class Schema : ConfigurationElement 
    {
        [ConfigurationProperty("name", IsRequired=true)]
        public String Name
        {
            get { return this["name"].ToString(); }
        }

        [ConfigurationProperty("connection", IsRequired = true)]
        public String Connection
        {
            get { return this["connection"].ToString(); }
        }

        [ConfigurationProperty("context", IsRequired = true)]
        public String Context
        {
            get { return this["context"].ToString(); }
        }

        [ConfigurationProperty("handler", IsRequired = false, DefaultValue="")]
        public String Handler
        {
            get { return this["handler"].ToString(); }
        }

        [ConfigurationProperty("traceSql", IsRequired = false, DefaultValue = false)]
        public bool TraceSql
        {
            get { return (bool)this["traceSql"]; }
        }

        [ConfigurationProperty("traceFormat", IsRequired = false, DefaultValue = "")]
        public String TraceFormat
        {
            get { return this["traceFormat"].ToString(); }
        }
        
    }
}
